home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / utility / uwserver.zip / uwserver.tar / Makefile next >
Makefile  |  1991-01-25  |  2KB  |  76 lines

  1. #! /bin/make -f
  2. #
  3. #    Makefile for UW version 4.2
  4. #
  5. # Specify VERSION 4.3 for 4.3BSD, 4.2 for 4.2BSD (including Sun 3.x)
  6. #
  7. # DEFINES is a list of the site-dependent compile-time options:
  8. #     -DUTMP        attempt to update "/etc/utmp" (who) file
  9. #     -DV7TTYS    V7-format "/etc/ttys" (pre-4.3BSD)
  10. #    -DSETOWN_BUG    fcntl(fd, F_SETOWN, pgrp) is broken (pre-4.3BSD)
  11. #    -Dvoid=int    kludge around broken C compilers
  12. #
  13. # UTMP specifies that UW should attempt to update the "/etc/utmp" file.
  14. # On some (foolish) systems this file is world-writeable.  Other
  15. # installations may wish AFTER CAREFUL EXAMINATION OF THE ISSUES to
  16. # install the UW server with group write access to the utmp file.
  17. #
  18. # V7TTYS should be used for V7-derived systems that do not have 4.3BSD's
  19. # "/etc/ttys" file.  This includes 4.2BSD and Sun UNIX.  There is no
  20. # support for USG's "/etc/inittab".
  21. #
  22. # SETOWN_BUG should be defined if the fcntl(fd, F_SETOWN, pgrp) system
  23. # call is broken (as it is in 4.2BSD and Sun 3.0 UNIX).  On those
  24. # machines the third argument must be negative to specify a process ID
  25. # and positive to specify a process group.
  26. #
  27. # Some C compilers do not understand pointers to void functions.  The
  28. # common kludge around this problem is to substitute "int" for "void"
  29. # everywhere.  "lint" doesn't like this, but the program will compile
  30. # into working code.
  31. #
  32. BINDIR    =    /usr/local/bin
  33. INCDIR    =    /usr/include/uw
  34. LIBDIR    =    /usr/local/lib
  35. VERSION    =    4.3
  36.  
  37. DEFINES    =    -DUTMP
  38.  
  39. MKFILES    =    server/Makefile lib/Makefile utility/Makefile
  40.  
  41. all:    DEFINES $(MKFILES)
  42.     cd server; make
  43.     cd lib; make
  44.     cd utility; make
  45.  
  46. depend:
  47.     cd server; make depend
  48.     cd lib; make depend
  49.     cd utility; make depend
  50.  
  51. install:    all
  52.     ln -s `pwd`/h $(INCDIR)
  53.     install -s server/uw $(BINDIR)/uw
  54.     install -s utility/uwtool $(BINDIR)/uwtool
  55.     install -s utility/uwtitle $(BINDIR)/uwtitle
  56.     install -s utility/uwterm $(BINDIR)/uwterm
  57.     install -s utility/uwplot $(BINDIR)/uwplot
  58.     cp lib/libuw.a $(LIBDIR); ranlib $(LIBDIR)/libuw.a
  59.  
  60. clean:
  61.     cd server; make clean
  62.     cd lib; make clean
  63.     cd utility; make clean
  64.  
  65. DEFINES:    Makefile
  66.     echo "" $(DEFINES) > DEFINES
  67.  
  68. server/Makefile:    Makefile server/Makefile_$(VERSION)
  69.     cd server; cp Makefile_$(VERSION) Makefile; make depend
  70.  
  71. lib/Makefile:    Makefile lib/Makefile_$(VERSION)
  72.     cd lib; cp Makefile_$(VERSION) Makefile; make depend
  73.  
  74. utility/Makefile:    Makefile utility/Makefile_$(VERSION)
  75.     cd utility; cp Makefile_$(VERSION) Makefile; make depend
  76.